package com.ub.party.common.vo.resp;

import com.ub.party.common.constants.RespCodeEnum;
import lombok.Data;

@Data
public class RespVo {
  /**
   * 响应结果码
   */
  private int code;

  /**
   * 响应提示
   */
  private String msg;
  /**
   * 响应内容
   */
  private Object data;

  public static RespVo ok() {
    RespVo respVo = new RespVo();
    respVo.setCode(RespCodeEnum.SUCCESS.getCode());
    respVo.setMsg(RespCodeEnum.SUCCESS.getMsg());
    return respVo;
  }

  public static RespVo ok(Object data) {
    RespVo respVo = ok();
    respVo.setData(data);
    return respVo;
  }
}
